home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 22 / CU Amiga Magazine's Super CD-ROM 22 (1998)(EMAP Images)(GB)[!][issue 1998-05].iso / PowerPC / Programming / PPCSmallEiffel / bin_c / compile_to_jvm20.c < prev    next >
C/C++ Source or Header  |  1998-01-16  |  21KB  |  715 lines

  1. /*
  2. -- ANSI C code generated by :
  3. -- SmallEiffel The GNU Eiffel Compiler -- Release (- 0.82)      --
  4. -- Copyright (C), 1994-98 - LORIA - UHP - CRIN - INRIA - FRANCE --
  5. -- Dominique COLNET and Suzanne COLLIN -    colnet@loria.fr     --
  6. --                 http://www.loria.fr/SmallEiffel              --
  7. */
  8. #include "compile_to_jvm.h"
  9. int r388is_a_in(T388* C,T0* a1,T0* a2){
  10. int R=0;
  11. T0* _ct=NULL;
  12. T0* _t2=NULL;
  13. T0* _t1=NULL;
  14. /*IF*/if ((r388written_mark())==((void*)(X291written_mark(a1)))) {
  15. R=1;
  16. }
  17. else {
  18. _ct=(((T355*)((T355*)a2)))->_current_type/*0*/;
  19. _t1=r388to_runnable(C,_ct);
  20. _t2=X291to_runnable(a1,_ct);
  21. /*IF*/if ((X291run_time_mark(_t1))==((void*)(X291run_time_mark(_t2)))) {
  22. R=1;
  23. }
  24. else {
  25. R=X291is_a(_t1,_t2);
  26. }
  27. /*FI*/}
  28. /*FI*/return R;
  29. }
  30. T0* r388look_up_for(T388* C,T0* a1,T0* a2){
  31. T0* R=NULL;
  32. R=r605look_up_for(((T605*)(r388base_class(C))),a1,a2);
  33. return R;
  34. }
  35. int r388jvm_convert_to(T0* a1){
  36. int R=0;
  37. /*IF*/if (X291is_reference(a1)) {
  38. /*[IRF3.2jvm_to_reference*/{T0* _ca=NULL;
  39. int _idx=0;
  40. T0* _rc=NULL;
  41. _ca=oBC364code_attribute;
  42. _rc=r657run_class(((T657*)(r388type_double_ref())));
  43. _idx=r355fully_qualified_constant_pool_index(((T355*)_rc));
  44. r256opcode_new(((T256*)_ca),_idx);
  45. /*[IRF3.4opcode_dup_x2*/r256opcode(((T256*)_ca),91,1);
  46. /*]*/
  47. /*[IRF3.4opcode_dup_x2*/r256opcode(((T256*)_ca),91,1);
  48. /*]*/
  49. /*[IRF3.4opcode_pop*/r256opcode(((T256*)_ca),87,-(1));
  50. /*]*/
  51. _idx=r95idx_fieldref4(((T95*)(oBC364constant_pool)),_idx,((T0*)ms86_473),((T0*)ms203_470));
  52. r256opcode_putfield(((T256*)_ca),_idx,-(3));
  53. }/*]*/
  54. R=1;
  55. }
  56. else {
  57. R=2;
  58. }
  59. /*FI*/return R;
  60. }
  61. /*No:TYPE_DOUBLE.expanded_initializer*/
  62. /*No:TYPE_DOUBLE.us_double*/
  63. int r388jvm_if_x_ne(void){
  64. int R=0;
  65. T0* _ca=NULL;
  66. _ca=oBC364code_attribute;
  67. /*[IRF3.4opcode_dcmpg*/r256opcode(((T256*)_ca),152,-(3));
  68. /*]*/
  69. R=r256opcode_ifne(((T256*)_ca));
  70. return R;
  71. }
  72. /*No:TYPE_DOUBLE.fz_dot*/
  73. /*No:TYPE_DOUBLE.is_generic*/
  74. /*No:TYPE_DOUBLE.fz_77*/
  75. /*No:TYPE_DOUBLE.jvm_write_local*/
  76. void r388jvm_initialize_local(int a1){
  77. /*[IRF3.4opcode_dconst_0*/r256opcode(((T256*)(oBC364code_attribute)),14,2);
  78. /*]*/
  79. /*[IRF3.6jvm_write_local*/{int b1=a1;
  80. r256opcode_dstore(((T256*)(oBC364code_attribute)),b1);
  81. }/*]*/
  82. }
  83. int fBC388used_as_reference=0;
  84. void r388used_as_reference(void){
  85. if (fBC388used_as_reference==0){
  86. fBC388used_as_reference=1;
  87. r388load_ref(((T0*)ms12_473));
  88. }}
  89. int fBC364type_double_ref=0;
  90. T0*oBC364type_double_ref=NULL;
  91. T0* r388type_double_ref(void){
  92. if (fBC364type_double_ref==0){
  93. T0* R=NULL;
  94. T0* _double_ref=NULL;
  95. fBC364type_double_ref=1;
  96. {T451*n=malloc(sizeof(*n));
  97. *n=M451;
  98. r451make(n,((T0*)ms12_473),NULL);
  99. _double_ref=(T0*)n;
  100. }
  101. {T657*n=malloc(sizeof(*n));
  102. *n=M657;
  103. /*[IRF3.3make*/((((T657*)(n)))->_base_class_name)=(_double_ref);
  104. /*]*/
  105. R=(T0*)n;
  106. }
  107. oBC364type_double_ref=R;}
  108. return oBC364type_double_ref;}
  109. /*No:TYPE_DOUBLE.is_reference*/
  110. void r388error(T0* a1,T0* a2){
  111. r683add_position(a1);
  112. r683error(((T683*)(oBC364eh)),a2);
  113. }
  114. T0* r388base_class(T388* C){
  115. T0* R=NULL;
  116. T0* _bcn=NULL;
  117. _bcn=(((T388*)C))->_base_class_name/*4*/;
  118. /*IF*/if ((_bcn)!=((void*)(NULL))) {
  119. R=r451base_class(((T451*)_bcn));
  120. }
  121. else {
  122. /*[IRF3.6append*/{T0* b1=((T0*)ms3_291);
  123. r7append(((T7*)(oBC683explanation)),b1);
  124. }/*]*/
  125. r683add_type((T0*)C,((T0*)ms67_470));
  126. r683print_as_fatal_error(((T683*)(oBC364eh)));
  127. }
  128. /*FI*/return R;
  129. }
  130. /*No:TYPE_DOUBLE.jvm_xastore*/
  131. /*No:TYPE_DOUBLE.is_any*/
  132. /*No:TYPE_DOUBLE.jvm_method_flags*/
  133. /*No:TYPE_DOUBLE.base_class_name*/
  134. /*No:TYPE_DOUBLE.jvm_push_local*/
  135. /*No:TYPE_DOUBLE.is_expanded*/
  136. /*No:TYPE_DOUBLE.is_basic_eiffel_expanded*/
  137. /*No:TYPE_DOUBLE.is_none*/
  138. /*No:TYPE_DOUBLE.is_integer*/
  139. /*No:TYPE_POINTER.id*/
  140. /*No:TYPE_POINTER.jvm_target_descriptor_in*/
  141. /*No:TYPE_POINTER.jvm_if_x_eq*/
  142. int r900has_creation(T900* C,T0* a1){
  143. int R=0;
  144. r683add_position(X776start_position(a1));
  145. r900error(/*(IRF4.6start_position*/(((T451*)((T451*)((((T900*)C))->_base_class_name/*4*/))))->_start_position/*4*//*)*/,((T0*)ms1_84));
  146. return R;
  147. }
  148. /*No:TYPE_POINTER.is_anchored*/
  149. /*No:TYPE_POINTER.is_array*/
  150. int r900is_a(T900* C,T0* a1){
  151. int R=0;
  152. /*IF*/if (X291is_pointer(a1)) {
  153. R=1;
  154. }
  155. else {
  156. R=r605is_subclass_of(((T605*)(r900base_class(C))),X291base_class(a1));
  157. /*IF*/if (R) {
  158. r900used_as_reference();
  159. }
  160. /*FI*/}
  161. /*FI*//*IF*/if (!(R)) {
  162. r683add_type((T0*)C,((T0*)ms1_900));
  163. r683add_type(a1,((T0*)ms67_470));
  164. }
  165. /*FI*/return R;
  166. }
  167. /*No:TYPE_POINTER.jvm_to_reference*/
  168. /*No:TYPE_POINTER.run_type*/
  169. /*No:TYPE_POINTER.is_pointer*/
  170. /*No:TYPE_POINTER.is_dummy_expanded*/
  171. int r900jvm_push_default(void){
  172. int R=0;
  173. /*[IRF3.4opcode_aconst_null*/r256opcode(((T256*)(oBC364code_attribute)),1,1);
  174. /*]*/
  175. R=1;
  176. return R;
  177. }
  178. /*No:TYPE_POINTER.is_string*/
  179. /*No:TYPE_POINTER.is_like_feature*/
  180. /*No:TYPE_POINTER.is_like_current*/
  181. void r900make(T900* C,T0* a1){
  182. {T451*n=malloc(sizeof(*n));
  183. *n=M451;
  184. r451make(n,((T0*)ms21_473),a1);
  185. C->_base_class_name=(T0*)n;
  186. }
  187. }
  188. /*No:TYPE_POINTER.nb_errors*/
  189. /*No:TYPE_POINTER.us_item*/
  190. void r900load_ref(T0* a1){
  191. T0* _rf=NULL;
  192. T0* _rc=NULL;
  193. T0* _cn=NULL;
  194. {T451*n=malloc(sizeof(*n));
  195. *n=M451;
  196. r451make(n,a1,NULL);
  197. _cn=(T0*)n;
  198. }
  199. _rc=r605run_class(((T605*)(r451base_class(((T451*)_cn)))));
  200. r355set_at_run_time(((T355*)_rc));
  201. _rf=r355get_feature_with(((T355*)_rc),((T0*)ms86_473));
  202. }
  203. /*No:TYPE_POINTER.us_pointer*/
  204. /*No:TYPE_POINTER.jvm_return_code*/
  205. int fBC900check_type=0;
  206. void r900check_type(T900* C){
  207. if (fBC900check_type==0){
  208. T0* _rc=NULL;
  209. T0* _bc=NULL;
  210. fBC900check_type=1;
  211. _bc=r900base_class(C);
  212. /*IF*/if ((/*(IRF4.9nb_errors*/(((T683*)((T683*)(oBC364eh))))->_nb_errors/*0*//*)*/)==(0)) {
  213. _rc=r900run_class(C);
  214. }
  215. /*FI*//*IF*/if ((/*(IRF4.9nb_errors*/(((T683*)((T683*)(oBC364eh))))->_nb_errors/*0*//*)*/)==(0)) {
  216. /*IF*/if (!((((T605*)((T605*)_bc)))->_is_expanded/*20*/)) {
  217. r900error(/*(IRF4.6start_position*/(((T451*)((T451*)((((T900*)C))->_base_class_name/*4*/))))->_start_position/*4*//*)*/,((T0*)ms3_900));
  218. }
  219. /*FI*/}
  220. /*FI*/}}
  221. int fBC364type_pointer_ref=0;
  222. T0*oBC364type_pointer_ref=NULL;
  223. T0* r900type_pointer_ref(void){
  224. if (fBC364type_pointer_ref==0){
  225. T0* R=NULL;
  226. T0* _pointer_ref=NULL;
  227. fBC364type_pointer_ref=1;
  228. {T451*n=malloc(sizeof(*n));
  229. *n=M451;
  230. r451make(n,((T0*)ms22_473),NULL);
  231. _pointer_ref=(T0*)n;
  232. }
  233. {T657*n=malloc(sizeof(*n));
  234. *n=M657;
  235. /*[IRF3.3make*/((((T657*)(n)))->_base_class_name)=(_pointer_ref);
  236. /*]*/
  237. R=(T0*)n;
  238. }
  239. oBC364type_pointer_ref=R;}
  240. return oBC364type_pointer_ref;}
  241. /*No:TYPE_POINTER.jvm_xnewarray*/
  242. /*No:TYPE_POINTER.jvm_descriptor_in*/
  243. /*No:TYPE_POINTER.start_position*/
  244. /*No:TYPE_POINTER.is_user_expanded*/
  245. /*No:TYPE_POINTER.is_character*/
  246. T0* r900written_mark(void){
  247. T0* R=NULL;
  248. R=((T0*)ms21_473);
  249. return R;
  250. }
  251. /*No:TYPE_POINTER.is_run_type*/
  252. T0* r900to_runnable(T900* C,T0* a1){
  253. T0* R=NULL;
  254. R=(T0*)C;
  255. r900check_type(C);
  256. return R;
  257. }
  258. /*No:TYPE_POINTER.is_formal_generic*/
  259. T0* r900generic_list(T900* C){
  260. T0* R=NULL;
  261. r900fatal_error_generic_list(C);
  262. return R;
  263. }
  264. /*No:TYPE_POINTER.fz_21*/
  265. /*No:TYPE_POINTER.is_real*/
  266. /*No:TYPE_POINTER.us_pointer_ref*/
  267. /*No:TYPE_POINTER.is_bit*/
  268. void r900fatal_error_generic_list(T900* C){
  269. r683add_type((T0*)C,((T0*)ms12_291));
  270. r683print_as_fatal_error(((T683*)(oBC364eh)));
  271. }
  272. /*No:TYPE_POINTER.jvm_check_class_invariant*/
  273. /*No:TYPE_POINTER.jvm_xaload*/
  274. T0* r900smallest_ancestor(T900* C,T0* a1){
  275. T0* R=NULL;
  276. T0* _rto=NULL;
  277. _rto=X291run_type(a1);
  278. /*IF*/if (X291is_pointer(_rto)) {
  279. R=(T0*)C;
  280. }
  281. else {
  282. R=r657smallest_ancestor(((T657*)(r900type_pointer_ref())),_rto);
  283. }
  284. /*FI*/return R;
  285. }
  286. /*No:TYPE_POINTER.is_boolean*/
  287. /*No:TYPE_POINTER.is_double*/
  288. int r900jvm_stack_space(void){
  289. int R=0;
  290. /*IF*//*AF*//*AE*/
  291. R=1;
  292. /*FI*/return R;
  293. }
  294. T0* r900run_class(T900* C){
  295. T0* R=NULL;
  296. R=r604run_class((T0*)C);
  297. return R;
  298. }
  299. T0* r900run_time_mark(void){
  300. T0* R=NULL;
  301. R=((T0*)ms21_473);
  302. return R;
  303. }
  304. int r900is_a_in(T900* C,T0* a1,T0* a2){
  305. int R=0;
  306. T0* _ct=NULL;
  307. T0* _t2=NULL;
  308. T0* _t1=NULL;
  309. /*IF*/if ((r900written_mark())==((void*)(X291written_mark(a1)))) {
  310. R=1;
  311. }
  312. else {
  313. _ct=(((T355*)((T355*)a2)))->_current_type/*0*/;
  314. _t1=r900to_runnable(C,_ct);
  315. _t2=X291to_runnable(a1,_ct);
  316. /*IF*/if ((X291run_time_mark(_t1))==((void*)(X291run_time_mark(_t2)))) {
  317. R=1;
  318. }
  319. else {
  320. R=X291is_a(_t1,_t2);
  321. }
  322. /*FI*/}
  323. /*FI*/return R;
  324. }
  325. T0* r900look_up_for(T900* C,T0* a1,T0* a2){
  326. T0* R=NULL;
  327. R=r605look_up_for(((T605*)(r900base_class(C))),a1,a2);
  328. return R;
  329. }
  330. int r900jvm_convert_to(T0* a1){
  331. int R=0;
  332. /*IF*/if (X291is_reference(a1)) {
  333. /*[IRF3.2jvm_to_reference*/{T0* _ca=NULL;
  334. int _idx=0;
  335. T0* _rc=NULL;
  336. _ca=oBC364code_attribute;
  337. _rc=r657run_class(((T657*)(r900type_pointer_ref())));
  338. _idx=r355fully_qualified_constant_pool_index(((T355*)_rc));
  339. r256opcode_new(((T256*)_ca),_idx);
  340. /*[IRF3.4opcode_dup_x1*/r256opcode(((T256*)_ca),90,1);
  341. /*]*/
  342. /*[IRF3.4opcode_swap*/r256opcode(((T256*)_ca),95,0);
  343. /*]*/
  344. _idx=r95idx_fieldref4(((T95*)(oBC364constant_pool)),_idx,((T0*)ms86_473),((T0*)ms154_470));
  345. r256opcode_putfield(((T256*)_ca),_idx,-(2));
  346. }/*]*/
  347. }
  348. /*FI*/R=1;
  349. return R;
  350. }
  351. /*No:TYPE_POINTER.expanded_initializer*/
  352. /*No:TYPE_POINTER.jvm_if_x_ne*/
  353. /*No:TYPE_POINTER.fz_dot*/
  354. /*No:TYPE_POINTER.is_generic*/
  355. /*No:TYPE_POINTER.jvm_write_local*/
  356. void r900jvm_initialize_local(int a1){
  357. /*[IRF3.4opcode_aconst_null*/r256opcode(((T256*)(oBC364code_attribute)),1,1);
  358. /*]*/
  359. /*[IRF3.6jvm_write_local*/{int b1=a1;
  360. r256opcode_astore(((T256*)(oBC364code_attribute)),b1);
  361. }/*]*/
  362. }
  363. int fBC900used_as_reference=0;
  364. void r900used_as_reference(void){
  365. if (fBC900used_as_reference==0){
  366. fBC900used_as_reference=1;
  367. r900load_ref(((T0*)ms22_473));
  368. }}
  369. /*No:TYPE_POINTER.is_reference*/
  370. void r900error(T0* a1,T0* a2){
  371. r683add_position(a1);
  372. r683error(((T683*)(oBC364eh)),a2);
  373. }
  374. T0* r900base_class(T900* C){
  375. T0* R=NULL;
  376. T0* _bcn=NULL;
  377. _bcn=(((T900*)C))->_base_class_name/*4*/;
  378. /*IF*/if ((_bcn)!=((void*)(NULL))) {
  379. R=r451base_class(((T451*)_bcn));
  380. }
  381. else {
  382. /*[IRF3.6append*/{T0* b1=((T0*)ms3_291);
  383. r7append(((T7*)(oBC683explanation)),b1);
  384. }/*]*/
  385. r683add_type((T0*)C,((T0*)ms67_470));
  386. r683print_as_fatal_error(((T683*)(oBC364eh)));
  387. }
  388. /*FI*/return R;
  389. }
  390. /*No:TYPE_POINTER.jvm_xastore*/
  391. /*No:TYPE_POINTER.is_any*/
  392. /*No:TYPE_POINTER.jvm_method_flags*/
  393. /*No:TYPE_POINTER.base_class_name*/
  394. /*No:TYPE_POINTER.jvm_push_local*/
  395. /*No:TYPE_POINTER.is_expanded*/
  396. /*No:TYPE_POINTER.is_basic_eiffel_expanded*/
  397. /*No:TYPE_POINTER.is_none*/
  398. /*No:TYPE_POINTER.is_integer*/
  399. /*No:E_WHEN.when_list*/
  400. void r843add_when_item_1(T843* C,T0* a1){
  401. int _v=0;
  402. _v=(((T349*)((T349*)a1)))->_expression_value/*12*/;
  403. /*IF*/if (/*(IRF4.6includes*/r377includes_integer(((T377*)((((T270*)((T270*)(/*(IRF4.6e_inspect*/(((T377*)((T377*)((((T843*)C))->_when_list/*16*/))))->_e_inspect/*0*//*)*/))))->_when_list/*16*/)),_v)/*)*/) {
  404. r843err_occ(C,_v,r349start_position(((T349*)a1)));
  405. }
  406.  else if (((((T843*)C))->_values/*20*/)==((void*)(NULL))) {
  407. {T353*n=malloc(sizeof(*n));
  408. *n=M353;
  409. r353make(n,_v,_v);
  410. C->_values=(T0*)n;
  411. }
  412. /*[IRF3.6put*/{T353* C1=((T353*)((((T843*)C))->_values/*20*/));
  413. int b1=1;
  414. int b2=_v;
  415. ((((T353*)C1))->_storage/*0*/)[(b2)-((((T353*)C1))->_lower/*12*/)]=(b1);
  416. }/*]*/
  417. }
  418. else {
  419. r353force(((T353*)((((T843*)C))->_values/*20*/)),1,_v);
  420. }
  421. /*FI*/}
  422. T0* r843to_runnable_integer(T843* C,T0* a1){
  423. T0* R=NULL;
  424. T0* _when_item=NULL;
  425. int _i=0;
  426. int _ne=0;
  427. /*IF*/if (((((T843*)C))->_when_list/*16*/)==((void*)(NULL))) {
  428. _ne=/*(IRF4.9nb_errors*/(((T683*)((T683*)(oBC364eh))))->_nb_errors/*0*//*)*/;
  429. C->_when_list=a1;
  430. /*IF*/if (((((T843*)C))->_list/*4*/)==((void*)(NULL))) {
  431. r683add_position((((T270*)((T270*)(/*(IRF4.6e_inspect*/(((T377*)((T377*)((((T843*)C))->_when_list/*16*/))))->_e_inspect/*0*//*)*/))))->_start_position/*8*/);
  432. r843error((((T843*)C))->_start_position/*0*/,((T0*)ms12_843));
  433. }
  434. else {
  435. _i=/*X631*/((int)(((T247*)((T247*)((((T843*)C))->_list/*4*/))))->_lower/*16*/);
  436. while (!(((_i)>(/*X631*/((int)(((T247*)((T247*)((((T843*)C))->_list/*4*/))))->_upper/*12*/)))||(((/*(IRF4.9nb_errors*/(((T683*)((T683*)(oBC364eh))))->_nb_errors/*0*//*)*/)-(_ne))>(0)))) {
  437. _when_item=X274to_runnable_integer(/*X631*/((T0*)r247item(((T247*)((((T843*)C))->_list/*4*/)),_i)),(T0*)C);
  438. /*IF*/if ((_when_item)==((void*)(NULL))) {
  439. r843error((((T843*)C))->_start_position/*0*/,((T0*)ms11_843));
  440. }
  441. else {
  442. /*X631*//*[IRF3.6put*/{T247* C1=((T247*)((((T843*)C))->_list/*4*/));
  443. T0* b1=_when_item;
  444. int b2=_i;
  445. ((((T247*)C1))->_storage/*4*/)[(b2)-((((T247*)C1))->_lower/*16*/)]=(b1);
  446. }/*]*/
  447. }
  448. /*FI*/_i=(_i)+(1);
  449. }
  450. }
  451. /*FI*//*IF*/if (((((T843*)C))->_compound/*12*/)!=((void*)(NULL))) {
  452. C->_compound=r592to_runnable(((T592*)((((T843*)C))->_compound/*12*/)),/*(IRF4.6current_type*//*(IRF4.6current_type*/r270current_type(((T270*)((((T377*)((T377*)((((T843*)C))->_when_list/*16*/))))->_e_inspect/*0*/)))/*)*//*)*/);
  453. /*IF*/if (((((T843*)C))->_compound/*12*/)==((void*)(NULL))) {
  454. r843error((((T843*)C))->_start_position/*0*/,((T0*)ms11_843));
  455. }
  456. /*FI*/}
  457. /*FI*/R=(T0*)C;
  458. }
  459. else {
  460. {T843*n=malloc(sizeof(*n));
  461. *n=M843;
  462. r843from_e_when(n,(T0*)C);
  463. R=(T0*)n;
  464. }
  465. R=r843to_runnable_integer(((T843*)R),a1);
  466. }
  467. /*FI*/return R;
  468. }
  469. void r843make(T843* C,T0* a1,T0* a2){
  470. C->_start_position=a1;
  471. C->_header_comment=a2;
  472. }
  473. /*No:E_WHEN.nb_errors*/
  474. void r843add_when_item_2(T843* C,T0* a1){
  475. int _i=0;
  476. int _u=0;
  477. int _l=0;
  478. _l=(((T372*)((T372*)a1)))->_lower_value/*20*/;
  479. _u=(((T372*)((T372*)a1)))->_upper_value/*16*/;
  480. /*IF*/if ((_l)>=(_u)) {
  481. r843error(r372start_position(((T372*)a1)),((T0*)ms8_843));
  482. }
  483. /*FI*//*IF*/if ((/*(IRF4.9nb_errors*/(((T683*)((T683*)(oBC364eh))))->_nb_errors/*0*//*)*/)==(0)) {
  484. _i=_l;
  485. while (!((_i)>(_u))) {
  486. /*IF*/if (/*(IRF4.6includes*/r377includes_integer(((T377*)((((T270*)((T270*)(/*(IRF4.6e_inspect*/(((T377*)((T377*)((((T843*)C))->_when_list/*16*/))))->_e_inspect/*0*//*)*/))))->_when_list/*16*/)),_i)/*)*/) {
  487. r843err_occ(C,_i,r372start_position(((T372*)a1)));
  488. _i=(_u)+(1);
  489. }
  490. else {
  491. _i=(_i)+(1);
  492. }
  493. /*FI*/}
  494. }
  495. /*FI*//*IF*/if ((/*(IRF4.9nb_errors*/(((T683*)((T683*)(oBC364eh))))->_nb_errors/*0*//*)*/)==(0)) {
  496. /*IF*/if (((((T843*)C))->_values/*20*/)==((void*)(NULL))) {
  497. {T353*n=malloc(sizeof(*n));
  498. *n=M353;
  499. r353make(n,_l,_u);
  500. C->_values=(T0*)n;
  501. }
  502. /*[IRF3.6set_all_with*/{T353* C1=((T353*)((((T843*)C))->_values/*20*/));
  503. int b1=1;
  504. r593set_all_with((((T353*)C1))->_storage/*0*/,b1,((((T353*)C1))->_upper/*8*/)-((((T353*)C1))->_lower/*12*/));
  505. }/*]*/
  506. }
  507. else {
  508. r353force(((T353*)((((T843*)C))->_values/*20*/)),1,_l);
  509. r353force(((T353*)((((T843*)C))->_values/*20*/)),1,_u);
  510. r353set_slice_with(((T353*)((((T843*)C))->_values/*20*/)),1,_l,_u);
  511. }
  512. /*FI*/}
  513. /*FI*/}
  514. void r843from_e_when(T843* C,T0* a1){
  515. T0* _when_item=NULL;
  516. int _i=0;
  517. C->_start_position=(((T843*)((T843*)a1)))->_start_position/*0*/;
  518. C->_list=X631twin((((T843*)((T843*)a1)))->_list/*4*/);
  519. _i=/*X631*/((int)(((T247*)((T247*)((((T843*)C))->_list/*4*/))))->_lower/*16*/);
  520. while (!((_i)>(/*X631*/((int)(((T247*)((T247*)((((T843*)C))->_list/*4*/))))->_upper/*12*/)))) {
  521. _when_item=X274twin(/*X631*/((T0*)r247item(((T247*)((((T843*)C))->_list/*4*/)),_i)));
  522. /*X274*//*[IRF3.3clear_e_when*/((((T349*)(((T349*)_when_item))))->_e_when)=(NULL);
  523. /*]*/
  524. /*X631*//*[IRF3.6put*/{T247* C1=((T247*)((((T843*)C))->_list/*4*/));
  525. T0* b1=_when_item;
  526. int b2=_i;
  527. ((((T247*)C1))->_storage/*4*/)[(b2)-((((T247*)C1))->_lower/*16*/)]=(b1);
  528. }/*]*/
  529. _i=(_i)+(1);
  530. }
  531. C->_header_comment=(((T843*)((T843*)a1)))->_header_comment/*8*/;
  532. C->_compound=(((T843*)((T843*)a1)))->_compound/*12*/;
  533. }
  534. /*No:E_WHEN.point2*/
  535. /*No:E_WHEN.values*/
  536. /*No:E_WHEN.start_position*/
  537. void r843err_occ(T843* C,int a1,T0* a2){
  538. r683add_position((((T270*)((T270*)(/*(IRF4.6e_inspect*/(((T377*)((T377*)((((T843*)C))->_when_list/*16*/))))->_e_inspect/*0*//*)*/))))->_start_position/*8*/);
  539. /*[IRF3.6append*/{T0* b1=((T0*)ms9_843);
  540. r7append(((T7*)(oBC683explanation)),b1);
  541. }/*]*/
  542. /*[IRF3.6append*/{T0* b1=r2to_string(a1);
  543. r7append(((T7*)(oBC683explanation)),b1);
  544. }/*]*/
  545. r843error(a2,((T0*)ms10_843));
  546. }
  547. /*No:E_WHEN.em1*/
  548. /*No:E_WHEN.list*/
  549. /*No:E_WHEN.em2*/
  550. /*No:E_WHEN.set_compound*/
  551. void r843add_value(T843* C,T0* a1){
  552. T0* _element=NULL;
  553. {T349*n=malloc(sizeof(*n));
  554. *n=M349;
  555. /*[IRF3.3make*/((((T349*)(n)))->_expression)=(a1);
  556. /*]*/
  557. _element=(T0*)n;
  558. }
  559. /*IF*/if (((((T843*)C))->_list/*4*/)==((void*)(NULL))) {
  560. C->_list=se_ma247(1,_element);
  561. }
  562. else {
  563. X631add_last((((T843*)C))->_list/*4*/,_element);
  564. }
  565. /*FI*/}
  566. /*No:E_WHEN.current_type*/
  567. /*No:E_WHEN.compound*/
  568. /*No:E_WHEN.header_comment*/
  569. void r843compile_to_jvm(T843* C,T0* a1,int a2){
  570. T0* _ca=NULL;
  571. int _must_test=0;
  572. int _bs=0;
  573. int _bi=0;
  574. int _point4=0;
  575. int _point3=0;
  576. _ca=oBC364code_attribute;
  577. /*IF*/if ((a2)>(0)) {
  578. _must_test=1;
  579. }
  580.  else if (r590no_check(((T590*)(oBC364run_control)))) {
  581. _must_test=1;
  582. }
  583. else {
  584. _must_test=(a1)!=((void*)(NULL));
  585. }
  586. /*FI*//*[IRF3.3clear*/((((T226*)(((T226*)(oBC843points1)))))->_upper)=(-(1));
  587. /*]*/
  588. /*IF*/if (_must_test) {
  589. _bi=(((T353*)((T353*)((((T843*)C))->_values/*20*/))))->_lower/*12*/;
  590. while (!((_bi)>((((T353*)((T353*)((((T843*)C))->_values/*20*/))))->_upper/*8*/))) {
  591. _bs=(_bi)+(1);
  592. while (!(((_bs)>((((T353*)((T353*)((((T843*)C))->_values/*20*/))))->_upper/*8*/))||(!(r353item(((T353*)((((T843*)C))->_values/*20*/)),_bs))))) {
  593. _bs=(_bs)+(1);
  594. }
  595. _bs=(_bs)-(1);
  596. /*IF*/if ((_bi)==(_bs)) {
  597. /*[IRF3.4opcode_dup*/r256opcode(((T256*)_ca),89,1);
  598. /*]*/
  599. r256opcode_push_integer(((T256*)_ca),_bi);
  600. r226add_last(((T226*)(oBC843points1)),r256opcode_if_icmpeq(((T256*)_ca)));
  601. }
  602. else {
  603. /*[IRF3.4opcode_dup*/r256opcode(((T256*)_ca),89,1);
  604. /*]*/
  605. r256opcode_push_integer(((T256*)_ca),_bi);
  606. _point3=r256opcode_if_icmplt(((T256*)_ca));
  607. /*[IRF3.4opcode_dup*/r256opcode(((T256*)_ca),89,1);
  608. /*]*/
  609. r256opcode_push_integer(((T256*)_ca),_bs);
  610. r226add_last(((T226*)(oBC843points1)),r256opcode_if_icmple(((T256*)_ca)));
  611. r256resolve_u2_branch(_point3);
  612. }
  613. /*FI*/_bi=(_bs)+(1);
  614. while (!(((_bi)>((((T353*)((T353*)((((T843*)C))->_values/*20*/))))->_upper/*8*/))||(r353item(((T353*)((((T843*)C))->_values/*20*/)),_bi)))) {
  615. _bi=(_bi)+(1);
  616. }
  617. }
  618. _point4=r256opcode_goto(((T256*)_ca));
  619. }
  620. /*FI*/r256resolve_with(oBC843points1);
  621. /*IF*/if (((((T843*)C))->_compound/*12*/)!=((void*)(NULL))) {
  622. r592compile_to_jvm(((T592*)((((T843*)C))->_compound/*12*/)));
  623. }
  624. /*FI*/C->_point2=r256opcode_goto(((T256*)_ca));
  625. /*IF*/if (_must_test) {
  626. r256resolve_u2_branch(_point4);
  627. }
  628. /*FI*/}
  629. int r843use_current(T843* C){
  630. int R=0;
  631. /*IF*/if (((((T843*)C))->_compound/*12*/)!=((void*)(NULL))) {
  632. R=r592use_current(((T592*)((((T843*)C))->_compound/*12*/)));
  633. }
  634. /*FI*/return R;
  635. }
  636. void r843error(T0* a1,T0* a2){
  637. r683add_position(a1);
  638. r683error(((T683*)(oBC364eh)),a2);
  639. }
  640. int r843includes_integer(T843* C,int a1){
  641. int R=0;
  642. R=((((((T843*)C))->_values/*20*/)!=((void*)(NULL)))&&(r353valid_index(((T353*)((((T843*)C))->_values/*20*/)),a1)))&&(r353item(((T353*)((((T843*)C))->_values/*20*/)),a1));
  643. return R;
  644. }
  645. T0* r843to_runnable_character(T843* C,T0* a1){
  646. T0* R=NULL;
  647. T0* _when_item=NULL;
  648. int _i=0;
  649. int _ne=0;
  650. /*IF*/if (((((T843*)C))->_when_list/*16*/)==((void*)(NULL))) {
  651. _ne=/*(IRF4.9nb_errors*/(((T683*)((T683*)(oBC364eh))))->_nb_errors/*0*//*)*/;
  652. C->_when_list=a1;
  653. /*IF*/if (((((T843*)C))->_list/*4*/)==((void*)(NULL))) {
  654. r683add_position((((T270*)((T270*)(/*(IRF4.6e_inspect*/(((T377*)((T377*)((((T843*)C))->_when_list/*16*/))))->_e_inspect/*0*//*)*/))))->_start_position/*8*/);
  655. r843error((((T843*)C))->_start_position/*0*/,((T0*)ms12_843));
  656. }
  657. else {
  658. _i=/*X631*/((int)(((T247*)((T247*)((((T843*)C))->_list/*4*/))))->_lower/*16*/);
  659. while (!(((_i)>(/*X631*/((int)(((T247*)((T247*)((((T843*)C))->_list/*4*/))))->_upper/*12*/)))||(((/*(IRF4.9nb_errors*/(((T683*)((T683*)(oBC364eh))))->_nb_errors/*0*//*)*/)-(_ne))>(0)))) {
  660. _when_item=X274to_runnable_character(/*X631*/((T0*)r247item(((T247*)((((T843*)C))->_list/*4*/)),_i)),(T0*)C);
  661. /*IF*/if ((_when_item)==((void*)(NULL))) {
  662. r843error((((T843*)C))->_start_position/*0*/,((T0*)ms11_843));
  663. }
  664. else {
  665. /*X631*//*[IRF3.6put*/{T247* C1=((T247*)((((T843*)C))->_list/*4*/));
  666. T0* b1=_when_item;
  667. int b2=_i;
  668. ((((T247*)C1))->_storage/*4*/)[(b2)-((((T247*)C1))->_lower/*16*/)]=(b1);
  669. }/*]*/
  670. }
  671. /*FI*/_i=(_i)+(1);
  672. }
  673. }
  674. /*FI*//*IF*/if (((((T843*)C))->_compound/*12*/)!=((void*)(NULL))) {
  675. C->_compound=r592to_runnable(((T592*)((((T843*)C))->_compound/*12*/)),/*(IRF4.6current_type*//*(IRF4.6current_type*/r270current_type(((T270*)((((T377*)((T377*)((((T843*)C))->_when_list/*16*/))))->_e_inspect/*0*/)))/*)*//*)*/);
  676. /*IF*/if (((((T843*)C))->_compound/*12*/)==((void*)(NULL))) {
  677. r843error((((T843*)C))->_start_position/*0*/,((T0*)ms11_843));
  678. }
  679. /*FI*/}
  680. /*FI*/R=(T0*)C;
  681. }
  682. else {
  683. {T843*n=malloc(sizeof(*n));
  684. *n=M843;
  685. r843from_e_when(n,(T0*)C);
  686. R=(T0*)n;
  687. }
  688. R=r843to_runnable_character(((T843*)R),a1);
  689. }
  690. /*FI*/return R;
  691. }
  692. void r843add_slice(T843* C,T0* a1,T0* a2){
  693. T0* _element=NULL;
  694. {T372*n=malloc(sizeof(*n));
  695. *n=M372;
  696. r372make(n,a1,a2);
  697. _element=(T0*)n;
  698. }
  699. /*IF*/if (((((T843*)C))->_list/*4*/)==((void*)(NULL))) {
  700. C->_list=se_ma263(1,_element);
  701. }
  702. else {
  703. X631add_last((((T843*)C))->_list/*4*/,_element);
  704. }
  705. /*FI*/}
  706. /*No:E_WHEN.compile_to_jvm_resolve_branch*/
  707. void r843afd_check(T843* C){
  708. /*IF*/if (((((T843*)C))->_compound/*12*/)!=((void*)(NULL))) {
  709. r592afd_check(((T592*)((((T843*)C))->_compound/*12*/)));
  710. }
  711. /*FI*/}
  712. T0*oBC843points1=NULL;
  713. /*No:E_WHEN.e_inspect*/
  714.  
  715.